package com.yellowpage.ndc.dao;

import java.util.List;

import com.yellowpage.white.dao.BaseDaoHibernateImpl;

import com.yellowpage.ca.data.User;
import com.yellowpage.ndc.data.Customer;

public class CustomerDaoImpl extends BaseDaoHibernateImpl<Customer, Long>
		implements CustomerDao {

	public CustomerDaoImpl() {
		super(Customer.class);
	}

	public Customer getCustomerByCustId(String custId) {
		String queryString = "from Customer c where c.custId = '" + custId + "'";
		List customerList = getHibernateTemplate().find(queryString);
		if (customerList.size() > 0) {
			return (Customer) customerList.get(0);
		}
		return null;
	}
}